package taro.todolist.dbinfo;

import java.util.ArrayList;
import java.util.List;

public class TableInfoServiceImpl implements TableInfoService {

    @Override
    public TableInfo getTableInfoByTableName(String TableName) {
        return new TableInfo(TableName);
    }

    @Override
    public List<TableInfo> getTableInfoList() {
        List<String> tableNames = getAllTableNames();
        List<TableInfo> res = new ArrayList<>();
        for ( String tableName: tableNames ){
            TableInfo obj = getTableInfoByTableName(tableName);
            res.add(obj);
        }
        return res;
    }

    private List<String> getAllTableNames(){
        return List.of("qwq");
    }
}
